import { createApp} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
/*
normalize.css
1. 安装 npm i normalize
2. 导入 import 'normalize.css'
*/
import 'normalize.css'
// 公共样式处理
import '@/assets/styles/common.less'

import componentsJs from '@/components/library/index'

// 全局注册自定义指令
import directives from './directives'
const app = createApp(App)
// app.directive(指令名,{生命周期})
Object.keys(directives).forEach(key => {
    app.directive(key,directives[key])
})

// 插件的使用,在main.js使用app.use(插件)
// createApp(App).use(store).use(router).use(componentsJs).mount('#app')
app.use(store).use(router).use(componentsJs).mount('#app')
